﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DataAccess;
//using BestSurvey;
//using System.Collections.Generic;

namespace WebUI
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //BestSurveyEntities en = new BestSurveyEntities();
            //SurveyType _SurveyType = new SurveyType();
            //_SurveyType.SurveyTypeName = "满意度调查";

            //en.AddToSurveyType(_SurveyType);

            using (BestSurveyEntities context = new BestSurveyEntities())
            {
                foreach (var c in context.SurveyTypes.Where(c => c.SurveyTypeID >= 34))
                {
                    string tt = c.SurveyTypeName;
                }
                context.SurveyTypes.First<SurveyType>();
            }


            //en.SaveChanges();
            //en.AcceptAllChanges();
            //var surveytypes = SurveyType.All();

            //SurveyType.Delete(x => x.SurveyTypeID == 33);

            //List<Survey> surveys = new SubSonic.Query.Select().From<Survey>()
            //    .Where(SurveyTable.SurveyIDColumn).IsGreaterThan(0)
            //    .ExecuteTypedList<Survey>();

            //SurveyType surveyType = new SubSonic.Query.Select().From<SurveyType>()
            //    .Where(SurveyTypeTable.SurveyTypeIDColumn).IsGreaterThan(0)
            //    .ExecuteSingle<SurveyType>();
            //string aaa = surveyType.ToString();
        }




    }
}